{% extends "base.html" %}
{% load i18n %}
{% block content %}
    <div class="top">
    <h1>
    <!-- <span>最信赖的海外在线招聘平台</span> -->
   <a href="/"><img src="/static/images/logo_03.png"></a> </h1>
    </div>
    <div class="frame">
         <div class="frame-a">
         <div id="lunbotu">
         <div class="tupianc">
        <a href="/"><img src="/static/images/ad_01.png"></a>
         <!--  <img src="/static/images/ad_02.png">
          <img src="/static/images/ad_03.jpg">
          <img src="/static/images/ad_04.png"> -->
         </div>
         <div class="shuzi">
           <ul>
               <li class="hover"></li>
               <li></li>
               <li></li>
               <li></li>
               <li></li>
           </ul>
           </div>
           </div> 
           </div>    
           <div class="frame-b">
      <form id="login" method="post" action="{% url "login" %}"style="width:346px;"> 
 
      {% csrf_token %}

     
        <li>
      <input type="text" class="text"  value="" placeholder="{% trans "Please fill in the mailbox" %}" name="email" autocomplete="off"><span class=" icon user" ></span>
        </li>
        <li>
      <input type="password" value=""  name="password" placeholder="{% trans "enter password" %}" autocomplete="off" ><span class=" icon lock" ></span>
        </li>

{% if  request.session.error %}
  

        <div class="p-container">
          <label class="fl" style="width:346px;"> {{request.session.error}}
     </label>              
          <div class="clear"> </div>
        </div>
{% endif %}

        <div class="p-container">
                <label class="fl" style="width:346px;">
      <input id="remember" value="" checked="checked" name="autoLogin" type="checkbox"> {% trans "Remember me" %}</label>
            <h6><a href="{% url "findPw" %}">{% trans "Forgot the password" %}?</a> </h6>
                        
                        
                        
                        
                        
          <div class="clear"> </div>
        </div>


        <div class="submit tip" style="display:none"></div>
        <div class="submit">
            <input type="submit" onClick="myFunction()" value="{% trans "login" %}" >
        </div>
                
    <h5 style="height:40px;line-height:40px;margin-top:7px;"><!-- {% trans "No KKoffer account yet" %} --><a href="{% url "reg" %}"> {% trans "Individual registration" %} </a>&nbsp
    <a href="{% url "signIn" %}">{% trans "Enterprise registration" %}</a> 

    <!-- onClick="$('#login').hide();$('#reg').show();return false" -->

    </h5>
       </form>
     
     <!-- 下面的是注册页 -->

       <form style="display:none" id="reg" method="post" action="{% url "reg" %}">


        <li>

    <input type="text" class="text" placeholder="{% trans "Please fill in the mailbox" %}"  name="email" autocomplete="off"><span class=" icon2 user2" style="" ></span>
        </li>
        <li>
          <input type="password" name="password" value="" placeholder="{% trans "enter password" %}" autocomplete="off"><span class=" icon2 lock2"></span>
        </li>
        <li>
          <input type="password" value=""  name="repassword" placeholder="{% trans "enter password" %}" autocomplete="off"><span class=" icon2 lock2"></span>
        </li>


        <div class="p-container">
        {{request.session.error}}
         
        </div>
        <div class="p-container">
           <label class="fl" ><input id="remember" value="" checked="checked" name="autoLogin" type="checkbox"> </label><i></i>{% trans "I have read and agreed" %} <a href="{% url "privacy" %}" target="_blank">《kkoffer{% trans "User agreement" %}》</a></label>
        </div>
        <div class="submit two">
            <input type="submit" onClick="myFunction()" 
            {% if request.path == '/user/signIn/' %}
            value="{% trans "company" %}{% trans "register" %}" 
            {% else %}
             value="{% trans "personal" %}{% trans "register" %}" 
            {% endif %}
            >
        </div>
          {% csrf_token %}
          <h5>{% trans "Existing account" %}<a href="javascript:void(0)" onClick="$('#reg').hide();$('#login').show();return false"> {% trans "login" %}</a> 

             <span> {% if request.path == '/user/signIn/' %}
              <a href="/user/reg/">{% trans "personal" %}{% trans "register" %}</a>
           
            {% else %}
            
               <a href="/user/signIn/">{% trans "company" %}{% trans "register" %}</a>
         
            {% endif %} </span>

          </h5>



      </form>


         </div>      
         </div>
{% if request.path == '/user/reg/' or request.path == '/user/signIn/' %}
  <script type="text/javascript">
    $('#reg').show()
    $('#login').hide()
  </script>            
 
{% endif %}
{% endblock %}  